package java44th.group.controller.wx.user;

import java44th.group.bean.admin.vo.BaseRespVo;
import java44th.group.bean.wx.vo.order.WxOrderStatusCount;
import java44th.group.bean.wx.vo.order.WxOrderStatusCountFather;
import java44th.group.service.wx.order.WxOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Aurhor: 帅的一批
 * @CreateAt: 2022/10/14 22:13
 * @Description:
 * @PACKAGE_NAME： java44th.group.controller.wx.user
 */

@RestController
@RequestMapping("wx/user")
public class WxUserController {

    @Autowired
    WxOrderService wxOrderService;

    @GetMapping("index")
    public BaseRespVo getUserIndex(){
        WxOrderStatusCount wxOrderStatusCount = wxOrderService.getOrderStatusCount();
        WxOrderStatusCountFather wxOrderStatusCountFather = new WxOrderStatusCountFather(wxOrderStatusCount);
        return BaseRespVo.ok(wxOrderStatusCountFather);
    }
}
